import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/', redirect: '/home/index' },
    {path: '/home',name: 'home',component: () => import('@/views/Home/home.vue'),children:[
      {path: 'index',name: 'index',component: () => import('@/views/Home/index.vue')},
      {path: 'cla',name: 'cla',component: () => import('@/views/Home/cla.vue')},
      {path: 'cart',name: 'cart',component: () => import('@/views/Home/cart.vue')},
      {path: 'my',name: 'my',component: () => import('@/views/Home/my.vue')},
    ]},
    {path: '/goods/:query',name: 'goods',component: () => import('@/views/Goods/index.vue')},
    {path: '/detail/:goods_id',name: 'detail',component: () => import('@/views/Detail/index.vue')},
  ],
})

export default router
